package com.ruoyi.carShopService.controller;

import com.ruoyi.carShopService.domain.ShopOrderManage;
import com.ruoyi.carShopService.service.ShopVerificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：马帅帅
 * @Date ：2024/9/13 10:34
 * 核销
 */
@RestController
@RequestMapping("/hexiao")
@CrossOrigin
public class ShopVerificationController {
    @Autowired
    private ShopVerificationService shopVerificationService;

    //通过核销码id查询订单信息
    @RequestMapping("/selectById")
    public List<ShopOrderManage> selectById(Long ordVerificationCode){
        return shopVerificationService.selectById(ordVerificationCode);
    }

    //修改订单状态
    @RequestMapping("/updateOrderStatus")
    public int updateOrderStatus(Long ordId){
        return shopVerificationService.updateOrderStatus(ordId);
    }
}
